/**
 * 
 */
package com.gragra.nounIdentification;
/**
 * implements the convergence assessment so that convergence depends on the number of words that have been
 * proposed for the category of interest
 * @author Christoph Teichmann
 * created Mar 26, 2013 10:40:56 AM
 * @version 0.1
 */
public class ConvergenceBySizeOfWords implements ConvergenceAssessment
{
	/**
	 * this creates a new instance that will assess convergence once the given max of proposed
	 * words for the type
	 * @param max
	 */
	public ConvergenceBySizeOfWords(int max)
	{this.max = max;}
	/**
	 * the max that the instance is looking for
	 */
	private final int max;
	/* (non-Javadoc)
	 * @see com.gragra.nounIdentification.ConvergenceAssessment#hasConverged(int, com.gragra.nounIdentification.NounIdentifier)
	 */
	@Override
	public boolean hasConverged(int iterations, NounIdentifier nounIdentifier)
	{return nounIdentifier.numberOfWords() > max;}
}